(defrule mbkssep
	(media ya)
	(jurnalistik ya)
	(info global)
	=>
	(assert (solution found))
	(printout t "Majalah Ganesha Kelompok Studi Sejarah, Ekonomi, dan Politik ITB" crlf)
)

(defrule media-itb
	(media ya)
	(jurnalistik ya)
	(info itb)
	=>
	(assert (mediaitb ya))
)

(defrule jurnalis
	(mediaitb ya)
	(wartawan ?x)
	=>
	(assert (solution found))
	(if (eq ?x 0) then 
		(printout t "Boulevard ITB" crlf)
	elif (eq ?x 1) then
		(printout t "Pers Mahasiswa ITB" crlf)
	)
)

(defrule tv
	(media ya)
	(broadcast ya)
	(media-broadcast tv)
	=>
	(assert (solution found))
	(printout t "Ganesha TV" crlf)
)

(defrule mediaradio
	(media ya)
	(broadcast ya)
	(media-broadcast radio)
	=>
	(assert (mediaradio ya))
)

(defrule radio
	(mediaradio ya)
	(profesional ?x)
	=>
	(if (eq ?x 0) then
		(printout t "8eh Radio ITB" crlf)
	elif (eq ?x 1) then
		(printout t "Radio Kampus ITB" crlf)
	)
)

;HOBI
;jenis hobi seni, speaking, petualang
;jenis seni 1 -> suara
(defrule hobi-nyanyi
	(hobi ya)
	(jenishobi seni)
	(jenisseni ?x)
	=>
	(if (eq ?x 1) then
		(printout t "Paduan Suara Mahasiswa ITB" crlf)
	else
		(assert (hobimusik ya))
	)
)

;jenis musik 1 -> tradisional
(defrule hobi-musik
	(hobimusik ya)
	(jenismusik ?x)
	=>
	(if (eq ?x 1) then
		(printout t "Keluarga Paduan Angklung ITB" crlf)
	else 
		(assert (musikmodern ya))
	)
)

;mozart 1 -> ya
(defrule musik-modern
	(musikmodern ya)
	(mozart ?x)
	=>
	(if (eq ?x 1) then
		(printout t "ITB Student Orchestra" crlf)
	else
		(assert (musikgahul ya))
	)
)

(defrule musik-gahul
	(jenismusik 0)
	(musikgahul ya)
	(jumlah-pemain ?x)
	=>
	(if (> ?x 5) then
		(printout t "Marching Band Waditra Ganesha" crlf)
	else
		(printout t "Unit Apresiasi Musik ITB" crlf)
	)
)

;jenishobi speaking
;bahasa 0 -> indonesia
;bahasa 1 -> inggris
(defrule speaking
	(hobi ya)
	(jenishobi speaking)
	(bahasa ?x)
	=>
	(if (eq ?x 0) then
		(assert (speaking indo))
	elif (eq ?x 1) then
		(assert (speaking inggris))
	)
)

(defrule speaking-indo
	(speaking indo)
	(usaha ya)
	=>
	(printout t "Techno Entrepreneur Club ITB" crlf)
)

(defrule speaking-inggris
	(speaking inggris)
	(debate ya)
	=>
	(printout t "Student English Forum ITB" crlf)
)

;dibentak 0 -> diem
;dibentak 1 -> ketawa
;dibentak 2 -> nangis
(defrule petualang
	(hobi ya)
	(jenishobi petualang)
	(bertahanhidup ya)
	(dibentak ?x)
	=>
	(if (eq ?x 0) then
		(printout t "Keluarga Mahasiswa Pecinta Alam Ganesha" crlf)
	elif (eq ?x 1) then
		(printout t "Resimen Mahasiswa Mahawarman Bataliyo I-ITB" crlf)
	)
)
